import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/base/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/base/admin_info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/base/logout',
    method: 'post'
  })
}

export function getUserList(data) {
  return request({
    url: '/user/get_user_list',
    method: 'post',
    data
  })
}

export function getRobotList(data) {
  return request({
    url: '/user/get_robot_list',
    method: 'post',
    data
  })
}

export function addRobot(data) {
  return request({
    url: '/user/add_robot',
    method: 'post',
    data
  })
}

export function updateUser(data) {
  return request({
    url: '/user/update_user_info',
    method: 'post',
    data
  })
}

export function updateUserAccount(data) {
  return request({
    url: '/user/operating_account',
    method: 'post',
    data
  })
}

export function unBind(data) {
  return request({
    url: '/user/unbind',
    method: 'post',
    data
  })
}

export function bindFriends(data) {
  return request({
    url: '/user/bind_friend',
    method: 'post',
    data
  })
}
